<template>
  <div class="goods">
    <goods-list-item v-for="i in goodsList" :goods-list-item="i" :key="i.id" class="goods-item"/>
  </div>
</template>

<script>
  import GoodsListItem from "./GoodsItem";

export default {
  name: "GoodsList",
  components: {
      GoodsListItem
  },
  props: {
    goodsList: {
      type: Array,
      default () {
        return []
      }
    }
  },
}
</script>

<style scoped>
  .goods {
    width: 65%;
    /*background-color: red;*/
    margin:auto; /*使居中*/
    display:flex;
    flex-wrap: wrap;
    justify-content: space-between
  }
</style>